package com.zack.gank.gankandroid.utils;

import android.content.Context;
import android.graphics.Bitmap;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.request.animation.GlideAnimation;
import com.bumptech.glide.request.target.SimpleTarget;

/**
 * Created by Android on 2017/7/28.
 */

public class ImageLoadUtils {
    private static  ImageLoadUtils imageLoadUtils=null;
    public ImageLoadUtils getInstance(){
        if(imageLoadUtils==null){
            synchronized (ImageLoadUtils.class){
                if(imageLoadUtils==null){
                    imageLoadUtils=new ImageLoadUtils();
                }
            }

        }
        return imageLoadUtils;
    }

    private void disPlayImage(Context mContext, String url, ImageView imageView){
        Glide.with(mContext).load(url).into(imageView);
        /*Glide.with(mContext).load(url).asBitmap().into(new SimpleTarget<Bitmap>() {

            @Override
            public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation) {

            }
        });*/
    }
}

